<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>YizhenBlog</title>
    <style>
        body {
            margin: 0;
            font-family: Arial, sans-serif;
            background-color: #1e1e1e;
            color: #ffffff;
        }
        /* 顶部导航样式 */
        .navbar {
            background-color: #1e1e1e;
            color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 20px;
        }
        .navbar-logo {
            display: flex;
            align-items: center;
        }
        .navbar-logo img {
            height: 30px; /* 顶部导航栏中logo的高度 */
            margin-right: 10px;
        }
        .navbar-logo span {
            font-size: 1.5rem;
            font-weight: bold;
        }
        .navbar-items {
            display: flex;
            align-items: center;
        }
        .navbar-items input {
            margin-right: 10px;
            padding: 5px;
            border-radius: 5px;
            border: none;
        }
        .navbar-items span, .navbar-items button {
            margin-right: 15px;
            cursor: pointer;
        }
        
        /* 打字效果样式 */
        .text-container {
            max-width: 500px; /* 增加容器宽度 */
            margin: 0 auto;
            text-align: center;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .text-container img {
            height: 100px; /* 新logo大小与顶部栏一致 */
        }
        .typing {
            color: #8e44ad;
            border-right: 2px solid #ffffff;
            white-space: nowrap;
            overflow: hidden;
            width: 0; /* 初始宽度为0 */
            animation: none; /* 初始无动画 */
        }
        @keyframes typing {
            from { width: 0; }
            to { width: 24ch; } /* 调整为24字符宽度 */
        }
        .cursor-blink {
            animation: blink 0.7s step-end infinite;
        }
        @keyframes blink {
            50% { border-color: transparent; }
        }
        .modal-content {
            background-color: #2c2c2c;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
        }
        .close {
            cursor: pointer;
            color: #ffffff;
            margin-top: 10px;
        }
    </style>
</head>
<body>

    <!-- 导航栏 -->
    <div class="navbar">
        <div class="navbar-logo">
            <img src="logo.png" alt="Logo">
            <span>YizhenBlog</span>
        </div>
        <div class="navbar-items">
            <input type="text" placeholder="搜索文档">
            <span>指南</span>
            <span>参考</span>
            <button>切换语言</button>
            <button onclick="window.location.href='https://github.com/akdisnicndjsoxm/blog.io'">GitHub</button>
        </div>
    </div>

    <!-- 内容区 -->
    <div class="text-container">
        <img src="logo.png" alt="Logo"> <!-- 新的 logo -->
        <h1 class="typing">欢迎来到 YizhenBlog</h1> <!-- 打字效果 -->
    </div>


    <script>
        window.addEventListener('load', function() {
            const typingElement = document.querySelector('.typing');
            typingElement.style.animation = 'typing 4s steps(24, end) forwards, blink 0.7s step-end infinite';

            // 动画结束后移除光标并停止闪烁
            setTimeout(function() {
                typingElement.classList.remove('cursor-blink');
                typingElement.style.borderRight = 'none'; // 隐藏光标
            }, 4000);

            // 添加光标闪烁效果
            typingElement.classList.add('cursor-blink');

            
        });
    </script>
</body>
</html>
